Skip to content

[AI-FSSDK] [FSSDK-12670] Block ODP identify event for single identifier#399

Open
jaeopt wants to merge 4 commits into
masterfrom
ai/jaeopt/FSSDK-12670-odp-event
Open

[AI-FSSDK] [FSSDK-12670] Block ODP identify event for single identifier#399
jaeopt wants to merge 4 commits into
masterfrom
ai/jaeopt/FSSDK-12670-odp-event

Conversation

@jaeopt
Copy link
Copy Markdown
Contributor

@jaeopt jaeopt commented May 26, 2026

Summary

Fixes ODP identify event to only send when multiple valid identifiers exist. Previously, the SDK always sent an identify event when creating a user context, even with just a single fs_user_id. This wastes network calls and pollutes ODP identity graphs with single-identifier records that provide no linking value.

Changes

  • Changed identify_user method signature across the identify chain to accept an identifiers hash instead of a single user_id keyword argument
  • Added identifier count check in OdpManager#identify_user to skip sending when fewer than 2 valid identifiers are present
  • Filters out identifiers with nil or empty string values before counting
  • Added debug-level logging when the identify event is skipped due to single identifier
  • Updated OptimizelyUserContext to construct identifiers hash using the KEY_FOR_USER_ID constant
  • Updated existing tests and added new tests for single-identifier blocking and empty-value filtering

Jira Ticket

FSSDK-12670

Notes

  • Reference implementation: Python SDK PR #513

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant